package linkedListQueue

import "fmt"

type node[E any] struct {
	e    E
	next *node[E] //指针类型
}

func makeNode0[E any](e E, next *node[E]) *node[E] {
	return &node[E]{
		e:    e,
		next: next,
	}
}

func makeNode1[E any](e E) *node[E] {
	return &node[E]{
		e: e,
	}
}

func makeNode[E any]() *node[E] {
	return &node[E]{}
}

func (n node[E]) String() string {
	return fmt.Sprintf("%+v", n.e)
}
